#include #include using namespace std; void main() { //cout.precision(3); ////cout << ios_base::fixed << endl; //cout.setf(ios_base::fixed); //cout.setf(ios_base::left); //cout.unsetf(ios_base::left); //double f = 1116.2349234234; ////f = 1/3.0; //cout << f << endl; //cout << setw(5) << "234" << setw(10) << "4576" << setw(10) << "76" << endl; //cout << setw(5) << "2354" << setw(10) << "46" << setw(10) << "7876" << endl; //cout << setw(5) << "24" << setw(10) << "42666576" << setw(10) << "783376" << endl; //cout << setw(5) << "234" << setw(10) << "4576" << setw(10) << "876" << endl; //cout << setw(5) << "34" << setw(10) << "4576" << setw(10) << "76" << endl; const double GRAVITY = 9.8; double height = 0; double speed; double initialHeight; double time = 0; cout << "Height? "; cin >> initialHeight; height = initialHeight; while(height > 0) { time = time + .01; speed = GRAVITY * time; height = initialHeight - ( (speed/2)* time); cout << setw(5) << time; cout << setw(10) << speed; cout << setw(10) << height << endl; } }